#ifndef DEVICE_H
#define DEVICE_H

#include <QObject>
#include <QAndroidJniObject>
#include <QList>
#include <QString>

#include <QObject>

class Device : public QObject
{
    Q_OBJECT
public:
    explicit Device(QObject *parent = 0);
    Q_PROPERTY(double  dentisty READ dentisty NOTIFY dentistyChanged)
    double dentisty(){
        return mdentisty;
    }

    //获取屏幕像素密度
    Q_INVOKABLE double getDentisy(){
        return QAndroidJniObject::callStaticMethod<double>("com/tommego/Device",
                                                        "getDentisy","()D");
    }

signals:
    void dentistyChanged();

public slots:
private:
    double mdentisty;
};

#endif // DEVICE_H
